//
//  NewsLunBoCollectionViewCell.m
//  WangYi
//
//  Created by dllo on 15/11/13.
//  Copyright © 2015年 0. All rights reserved.
//

#import "NewsLunBoCollectionViewCell.h"
#import "LunBoModel.h"
@implementation NewsLunBoCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
        
        
        [self  creatSubViews];
    }
    
    
    return self;
}

-(void)creatSubViews{


    self.headImageView = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH*5 ,0, WIDTH * 375 - WIDTH*10, HEIGHT * 500)];
    self.headImageView.backgroundColor = [UIColor greenColor];
    [self addSubview:self.headImageView];
    //    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:self.URL] placeholderImage:[UIImage imageNamed:@"zhanwei.png"]];
    self.headLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH*5, HEIGHT*400, WIDTH * 375 - WIDTH*10, HEIGHT*60)];
    self.headLabel.backgroundColor =[ UIColor grayColor];
    [self addSubview:self.headLabel];
    
    self.detailLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH*5, HEIGHT*460, WIDTH * 375 - WIDTH*10, HEIGHT*100)];
    self.detailLabel.backgroundColor =[ UIColor grayColor];
    [self addSubview:self.detailLabel];
    
    self.numberLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH*325, HEIGHT*400, WIDTH * 45, HEIGHT*40)];
    self.numberLabel.backgroundColor =[ UIColor redColor];
    [self addSubview:self.numberLabel];
    
    self.downButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.downButton.frame = CGRectMake(WIDTH*300, HEIGHT * 637, WIDTH * 30, HEIGHT * 30);
    self.downButton.backgroundColor = [UIColor redColor];
    [self addSubview:self.downButton];

}

-(void)setModel:(LunBoModel *)model{

    _model = model;
    
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.imgurl] placeholderImage:[UIImage imageNamed:@"zhanwei.png"]];
    
    
    
}


@end
